package com.scaffold.springmvc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.scaffold.springmvc.dao.UserInfoDAO;
import com.scaffold.springmvc.entity.UserInfo;

@Service
@Transactional(rollbackFor = Exception.class)
public class UserInfoService {
	@Autowired
	private UserInfoDAO userDAO;
	
	public List<UserInfo> search(String keyword){
		return userDAO.queryList(keyword);
	}

	public void save(UserInfo user) {
		userDAO.save(user);
	}
	
}